package com.ziyueyuwen.xiniao.enums;

/**
 * @author wancheng  on 2018/12/19.
 */
public enum ClassStatusEnum {
    //
    CLASS_UN_START("未开课"),
    CLASS_IMPLEMENTING("上课中"),
    CLASS_ENDING("已结课");

    private String desc;

    public static ClassStatusEnum getEnum(String type){
        ClassStatusEnum res = null;
        for (ClassStatusEnum e:ClassStatusEnum.values()) {
            if (e.getDesc().equals(type)){
                res = e;
                break;
            }
        }
        return res;
    }

    ClassStatusEnum(String desc) {
        this.desc = desc;
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }
}
